﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using PhatPhucLoc.report;
using System.Collections;

namespace PhatPhucLoc.view
{
    public partial class FormReportLoiNhuan : Form
    {
        public ArrayList ds;
        private int i;
        public FormReportLoiNhuan(int i)
        {
            InitializeComponent();
            this.i = i;
        }

        private void FormReportLoiNhuan_Load(object sender, EventArgs e)
        {
            if (i == 0)
            {
                if (ds != null)
                {
                    loinhuannhomhang hd = new loinhuannhomhang();
                    hd.SetDataSource(ds);
                    crystalReportViewer1.ReportSource = hd;
                }
            }
            else if (i == 1)
            {
                if (ds != null)
                {
                    loinhuankhachhang hd = new loinhuankhachhang();
                    hd.SetDataSource(ds);
                    crystalReportViewer1.ReportSource = hd;
                }
            }
            else if (i == 2)
            {
                if (ds != null)
                {
                    loinhuanhanghoa hd = new loinhuanhanghoa();
                    hd.SetDataSource(ds);
                    crystalReportViewer1.ReportSource = hd;
                }
            }
            else if (i == 3)
            {
                if (ds != null)
                {
                    loinhuankhachhang1 hd = new loinhuankhachhang1();
                    hd.SetDataSource(ds);
                    crystalReportViewer1.ReportSource = hd;
                }
            }
        }
    }
}
